package com.alipear.shopcredit.common.view.wrapper;

import android.view.LayoutInflater;
import android.widget.CheckBox;
import android.widget.CompoundButton;

import com.alipear.appbase.BaseApp;
import com.alipear.ppwhere.common.R;

/**
 * Created by zoulinlin123 on 15/5/9.
 */
public class CheckBoxWrapper {
    public static  CheckBox compileCheckbox(boolean defaultVal, CompoundButton.OnCheckedChangeListener listener) {
        CheckBox checkBox= (CheckBox)BaseApp.getLayoutInflater().inflate(R.layout.checkbox, null);
        checkBox.setChecked(defaultVal);
        checkBox.setOnCheckedChangeListener(listener);
        return checkBox;
    }
}
